#!/bin/bash
# name: rpminfo.sh
# date: 2020-07-17
# Collect all RPM packet information on the system
# output rpminfo.txt

PATH=/usr/lib64/qt-3.3/bin:/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

fc_rpm() {
echo "Hostname: $HOSTNAME"
echo "Address:  `ifconfig |grep inet | grep -v inet6 | head -1 | awk '{print $2}'`"
dmidecode  -t1 | grep -A10 "System Information"

yum info `rpm -qa`
}

fc_rpm >>rpminfo.txt
